# Note: make sure there is no leanring-rebase branch online.

# Create a file on branch master
git checkout master && echo "Master" > master && git add master && git commit -m "Add master"

# Create a local branch
git branch learning-rebase

# Checkout learning-rebase
git checkout learning-rebase

# Create a file
echo "Learning Rebase" > rebase

# Stage file rebase
git add rebase

# Commit 
git commit -m "Add rebase"

# Rebase on master
git rebase master

# Master merge learning-rebase
git checkout master && git merge learning-rebase

# Submit commit
git push

# Then remove local Branch learning-rebase
 git branch -D learning-rebase

# Finally remove rebase from repo
rm master && git add master && git commit -m "Remove master"
rm rebase && git add rebase && git commit -m "Remove rebase rebased from branch [learning-rebase]."
git push